load(
    "@nazel//:nazel_build.bzl",
    "nazel_cc_library",
    "nazel_cc_pymodule",
    "nazel_cc_test",
)

package(default_visibility = ["//visibility:public"])

nazel_cc_library(
    name = "proto_feed",
    srcs = [
        "proto_feed_builder.cc",
    ],
    hdrs = [
        "proto_feed_builder.h",
    ],
    deps = [
        "//cc/coin1/base:exception_util",
        "//cc/coin1/fastfeed/view",
        "@apiset//coin/feed/fastfeed:fastfeed_cpp",
        "@apiset//coin/proto:coin_cpp",
    ],
)

nazel_cc_library(
    name = "price_map",
    hdrs = [
        "price_map.h",
    ],
)

nazel_cc_test(
    name = "price_map_unittest",
    srcs = ["price_map_unittest.cc"],
    deps = [":price_map"],
)

nazel_cc_pymodule(
    name = "pyfastfeed.so",
    srcs = ["pymodule.cc"],
    deps = [
        ":feed_cache",
        ":proto_feed",
        "//cc/coin1/base:exception_util",
        "//cc/third_party:fmt",
    ],
)

nazel_cc_library(
    name = "feed_cache",
    srcs = [
        "double_shift_feed_builder.cc",
        "feed_cache.cc",
    ],
    hdrs = [
        "double_shift_feed_builder.h",
        "feed_cache.h",
    ],
    deps = [
        ":proto_feed",
        "//cc/coin1/base:exception_util",
        "//cc/coin1/base:filesystem",
        "//cc/coin1/fastfeed/view",
        "//cc/coin2",
        "//cc/third_party:fmt",
        "@apiset//coin/proto:coin_cpp",
        "@motion//orio",
    ],
)

nazel_cc_test(
    name = "feed_cache_unittest",
    srcs = ["feed_cache_unittest.cc"],
    deps = [":feed_cache"],
)
